<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/2/11
 * Time: 12:05
 */
declare(strict_types=1);

namespace App\Service;
use App\Utils\CustomUtils;
use Hyperf\Di\Annotation\Inject;

/**
 * Class CountAmountService
 * @package App\Service
 * 一个计算各种金额的service，不做业务，只做各类费用计算
 */
class CountAmountService
{

    // 费用 * 费率
    public function countCommonFee($settleAmount, $rate) {
        bcscale(8);
        return ceil(bcdiv(bcmul((string)$settleAmount, (string)$rate), '10000'));
    }

}